package pl.edu.agh.iosr.gamblingzone.model;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * The Class MoneyVoucherRequest.
 */
@AttributeOverride(name="id",
        column=@Column(name="REQUEST_ID"))
@Entity(name="VOUCHER_REQUESTS")
@Inheritance(strategy = InheritanceType.JOINED)
public class MoneyVoucherRequest extends EntityModel {
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -5367015006659131453L;

	/** The money. */
	@Column(name = "REQUEST_MONEY", nullable = false)
	private Long money;
	
	/** The owner. */
	@ManyToOne
	@JoinColumn(name="USER_ID", nullable=false)
	private User owner;

	/**
	 * Gets the money.
	 * 
	 * @return the money
	 */
	public Long getMoney() {
		return money;
	}

	/**
	 * Sets the money.
	 * 
	 * @param money the new money
	 */
	public void setMoney(Long money) {
		this.money = money;
	}

	/**
	 * Gets the owner.
	 * 
	 * @return the owner
	 */
	public User getOwner() {
		return owner;
	}

	/**
	 * Sets the owner.
	 * 
	 * @param owner the new owner
	 */
	public void setOwner(User owner) {
		this.owner = owner;
	}
}
